#include <iostream>
using namespace std;

int main()
{
	int n, i, j;
	int x[10];
	cout<<"Number n : ";
	cin>>n;
	for(i=1;i<=n; i++){
		x[i-1]=i;
	}
	for(j=0; j<n; j++){
		for (i=0;i<=j; i++)
			cout<<x[i]<<" ";
		cout<<"; ";
		for (i=j+1;i<n; i++)
			cout<<x[i]<<" ";
		cout<<"; ";
	}
	cout<<"\n";
	
return 0;
}
